package com.tms.domain;

import java.util.Date;

/**
 * bill响应处理类
 *
 * @author ozj
 * @date 2020-02-18 14:53
 */
public class BillResponse {

    /**
     * bill的数据库id
     */
    private int id;

    /**
     * bill的单号
     */
    private String billNo;

    /**
     * tollDef的familyId
     */
    private int familyId;

    /**
     * toolDef的familyName
     */
    private String familyName;

    /**
     * toolDef的name
     */
    private String name;

    /**
     * toolDef的编辑人
     */
    private User editPerson;

    /**
     * toolDef的模板名称
     */
    private String model;

    /**
     * toolDef的partNo
     */
    private String partNo;

    /**
     * toolDef的usedFor
     */
    private String usedFor;

    /**
     * toolDef的upl
     */
    private int upl;

    /**
     * toolDef的pmPeriod
     */
    private int pmPeriod;

    /**
     * toolDef的remark
     */
    private String remark;

    /**
     * toolDef的code，tool的code
     */
    private String code;

    /**
     * tool的seqId
     */
    private int seqId;

    /**
     * workcell
     */
    private Workcell workcell;

    /**
     * 提交人
     */
    private User submitPerson;

    /**
     * 提交时间
     */
    private Date submitTime;

    /**
     * 第一次审核人
     */
    private User firstPerson;

    /**
     * 第一次审核时间
     */
    private Date firstTime;

    /**
     * 第二次审核人
     */
    private User secondPerson;

    /**
     * 第二次审核时间
     */
    private Date secondTime;

    /**
     * 图片路径
     */
    private String image;

    /**
     * 当前状态
     */
    private Status status;

    /**
     * tool的数量
     */
    private int count;

    /**
     * tool位置
     */
    private Location location;

    public BillResponse() {
    }

    public BillResponse(Bill bill) {
        this.id = bill.getId();
        this.billNo = bill.getBillNo();
        this.workcell = bill.getSubPerson().getWorkcell();
        this.code = bill.getTool().get(0).getCode();
        this.seqId = bill.getTool().get(0).getSeqId();
        this.count = bill.getCount();
        this.familyId = bill.getTool().get(0).getTDef().getFamilyId();
        this.familyName = bill.getTool().get(0).getTDef().getFamily();
        this.model = bill.getTool().get(0).getTDef().getModel();
        this.editPerson = bill.getTool().get(0).getTDef().getEditer();
        this.name = bill.getTool().get(0).getTDef().getName();
        this.upl = bill.getTool().get(0).getTDef().getUpl();
        this.partNo = bill.getTool().get(0).getTDef().getPartNo();
        this.usedFor = bill.getTool().get(0).getTDef().getUsedFor();
        this.pmPeriod = bill.getTool().get(0).getTDef().getPmPeriod();
        this.remark = bill.getTool().get(0).getTDef().getRemark();
        this.image = bill.getImage();
        this.secondPerson = bill.getSecondPerson();
        this.firstPerson = bill.getFirstPerson();
        this.firstTime = bill.getFirstTime();
        this.secondTime = bill.getSecondTime();
        this.submitPerson = bill.getSubPerson();
        this.submitTime = bill.getSubTime();
        this.status = bill.getStatus();
    }

    public BillResponse(int id, String billNo, int familyId, String familyName, String name, User editPerson,
                        String model, String partNo, String usedFor, int upl, int pmPeriod, String remark, String code,
                        int seqId, Workcell workcell, User submitPerson, Date submitTime, User firstPerson,
                        Date firstTime, User secondPerson, Date secondTime, String image, Status status, int count, Location location) {
        this.id = id;
        this.billNo = billNo;
        this.familyId = familyId;
        this.familyName = familyName;
        this.name = name;
        this.editPerson = editPerson;
        this.model = model;
        this.partNo = partNo;
        this.usedFor = usedFor;
        this.upl = upl;
        this.pmPeriod = pmPeriod;
        this.remark = remark;
        this.code = code;
        this.seqId = seqId;
        this.workcell = workcell;
        this.submitPerson = submitPerson;
        this.submitTime = submitTime;
        this.firstPerson = firstPerson;
        this.firstTime = firstTime;
        this.secondPerson = secondPerson;
        this.secondTime = secondTime;
        this.image = image;
        this.status = status;
        this.count = count;
        this.location = location;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    public int getFamilyId() {
        return familyId;
    }

    public void setFamilyId(int familyId) {
        this.familyId = familyId;
    }

    public String getFamilyName() {
        return familyName;
    }

    public void setFamilyName(String familyName) {
        this.familyName = familyName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public User getEditPerson() {
        return editPerson;
    }

    public void setEditPerson(User editPerson) {
        this.editPerson = editPerson;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getPartNo() {
        return partNo;
    }

    public void setPartNo(String partNo) {
        this.partNo = partNo;
    }

    public String getUsedFor() {
        return usedFor;
    }

    public void setUsedFor(String usedFor) {
        this.usedFor = usedFor;
    }

    public int getUpl() {
        return upl;
    }

    public void setUpl(int upl) {
        this.upl = upl;
    }

    public int getPmPeriod() {
        return pmPeriod;
    }

    public void setPmPeriod(int pmPeriod) {
        this.pmPeriod = pmPeriod;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getSeqId() {
        return seqId;
    }

    public void setSeqId(int seqId) {
        this.seqId = seqId;
    }

    public Workcell getWorkcell() {
        return workcell;
    }

    public void setWorkcell(Workcell workcell) {
        this.workcell = workcell;
    }

    public User getSubmitPerson() {
        return submitPerson;
    }

    public void setSubmitPerson(User submitPerson) {
        this.submitPerson = submitPerson;
    }

    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    public User getFirstPerson() {
        return firstPerson;
    }

    public void setFirstPerson(User firstPerson) {
        this.firstPerson = firstPerson;
    }

    public Date getFirstTime() {
        return firstTime;
    }

    public void setFirstTime(Date firstTime) {
        this.firstTime = firstTime;
    }

    public User getSecondPerson() {
        return secondPerson;
    }

    public void setSecondPerson(User secondPerson) {
        this.secondPerson = secondPerson;
    }

    public Date getSecondTime() {
        return secondTime;
    }

    public void setSecondTime(Date secondTime) {
        this.secondTime = secondTime;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }
}
